package com.zcx.qshop.dialog;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.zcx.qshop.R;

/**
 * Created by Administrator on 2015/9/10 0010.
 */
public abstract class WhetherDialog extends QSDialog {

    public WhetherDialog(Context context, String content) {

        super(context);

        setContentView(R.layout.dialog_whether);

        View.OnClickListener onClickListener = new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                switch (v.getId()){

                    case R.id.dialog_whether_yes:

                        onYes();

                        break;

                }

                dismiss();

            }

        };

        ((TextView)findViewById(R.id.dialog_whether_content)).setText(content);

        findViewById(R.id.dialog_whether_yes).setOnClickListener(onClickListener);

        findViewById(R.id.dialog_whether_no).setOnClickListener(onClickListener);

    }

    protected abstract void onYes();

}
